<style>
  #qrcode img{ max-width: 400px; max-height: 400px;  margin: 0 auto}
  .content-box img:hover{ opacity: 0.5}
</style>
<div class="crumbs">
  <h3>拼团券列表</h3>
  <p><a ui-sref="main.groupbuy-list" >拼团券管理</a> > 拼团券列表</p>
</div>

<div class="content-box">
  <div class="form-inline form-group "  >

    <select class="form-control input-sm "  ng-options="v.id as v.ticketName for v in activitys" ng-model="list.groupActivityId"   >
      <option value="">--拼团活动选择--</option>
    </select>

    <select class="form-control input-sm "  ng-options="v.code as v.desc for v in ticketState " ng-model="list.state"   >
      <option value="">--拼团券状态--</option>
    </select>

    <input type="text" class="form-control input-sm"  placeholder="手机号或者团券ID" maxlength="30" size="30" ng-model="list.searchCondition">
    <div class="inline-block f12 ">
      <button   type="button" class="btn btn-primary btn-sm  input-sm " ng-click="submitSearch(list)">查询</button>
    </div>
    <div class="form-inline form-group float-right"  >
      拼团券数量（已使用/总量）：<i class=" c-blue">{{gridParent.usedCount}}/{{gridParent.allCount}}</i>
    </div>
  </div>
  <table class=" table   table-hover table-condensed  table-striped text-center ">
    <thead style="background:#8A8BC4; color: #fff">
    <tr>
      <td>ID</td>
      <td>身份属性</td>
      <td>姓名</td>
      <td>联系电话</td>
      <td>拼团券ID</td>
      <td>截止日期</td>
      <td>状态</td>
      <td>操作</td>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="g in grid.result">
      <td ng-bind="g.id"></td>
      <td ng-bind="g.userTypeDesc "></td>
      <td >{{g.name}}</td>
      <td ng-bind="g.phone "></td>
      <td>{{g.ticketNo}}</td>
      <td>{{g.overDate|date:'yyyy-MM-dd HH:mm:ss' }}</td>
      <td>{{g.stateDesc }}</td>
      <td >
        <button  ng-if="g.state!==2" class="btn btn-warning btn-xs" ng-class="{'btn-warning':(g.state===1),'btn-danger':(g.state===0)}" ng-click="isStart(g.id,g.state)" >{{g.state===1?"恢复":g.state===0?"使用":""}}</button>
      </td>
    </tr>
    <tr ng-if="!grid.result"><td colspan="8" class="f12 c-999 " >没有相关数据!</td></tr>
    </tbody>
  </table>
  <div ng-include="'/templates/partial/page.html'" style="height: 50px;background-color: #f4f4f6"></div>
</div>


<!--dialog-->
<div class="modal fade myModalCode" >
  <div class="modal-dialog " style="width: 460px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">{{qrcode.name}}</h4>
      </div>
      <div class="modal-body">
        <div class="dialog-content f12  text-center  lh200">
          <div id="qrcode" ></div>
          <i class="f12 c-666 lh240">(下载请点击右键,另存为图片)</i>

        </div>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
